#!/usr/bin/env python
import subprocess
import sys

def install_requirements():
    """安装所需的Python包"""
    packages = [
        'redis',
        'celery'
    ]
    
    print("正在安装所需的Python包...")
    for package in packages:
        print(f"安装 {package}...")
        subprocess.check_call([sys.executable, "-m", "pip", "install", package])
    
    print("所有依赖包已安装完成")

if __name__ == "__main__":
    install_requirements()
    print("环境设置完成，现在可以运行分析脚本") 